<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Teste socket</title>
</head>
<body>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.dev.js'></script>

    <script type="text/javascript">
        let socket = io('http://localhost:3000');

        socket.on('tweet', data => {
            console.log(data);
        });

        socket.on('like', data => {
            console.log(data);
        });
    </script>
</body>
</html>